package 构造器;

public class 构造器 {
    public static void main(String[] args) {
        Car c=new Car();
        //构造的数据类型+类名=new+构造器
        System.out.println(c.name);
        System.out.println(c.price);
        Car c1=new Car("宝马行x6",125);
        System.out.println(c1.name);
        System.out.println(c1.price);
    }
}
